package com.lcq.study;

import com.lcq.study.transsql.TransSql;

/**
 * @ClassName InheritTest
 * @Description
 * @Author lichuanqi
 * @Date 2022/3/18 13:16
 * @Version 1.0
 **/
public class InheritTest {
    public static void main(String[] args) {
        B b = new B();
        b.tell();
        ((A)b).tell();
    }

    static class A {
        public void tell(){
            System.out.println("i am A");
        }
    }

    static class B extends A {
        public void tell(){
            System.out.println("i am B");
        }
    }
}
